package com.ztgf.commodity.mapper;

import com.baomidou.mybatisplus.mapper.BaseMapper;
import com.ztgf.commodity.models.dto.CommoditySpecificationRelationDTO;
import com.ztgf.commodity.models.vo.CommodityAttrPriceVO;
import com.ztgf.commodity.models.vo.CommoditySpecifitionInfoVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 商品规格关系表映射
 *
 * @author chenyu.wang
 * @Date 2020-05-27 10:59:08
 */
@Mapper
public interface CommoditySpecificationRelationMapper extends BaseMapper<CommoditySpecificationRelationDTO> {


    /**
     * description: 根据商品id，和属性ids查询具体sku
     * param: [id, ids]
     * author: chenyu.wang
     * date: 2020-06-08
     * return: com.ztgf.commodity.models.vo.CommodityAttrPriceVO
     */
    CommodityAttrPriceVO getGoodsSkuPrice(@Param("id") Long id, @Param("ids") String ids);

    CommoditySpecificationRelationDTO selectByCommodityAndAttrIds(@Param("goodsId") Long goodsId, @Param("atrrIds") String atrrIds);

    /*
     * @description:查询商品最低价
     * @author: chenyu.wang
     * @date: 2020-09-07
     */
    CommodityAttrPriceVO getGoodsMinPrice(@Param("goodsId") Long goodsId);

}
